package com.xh3140.xwidget.imageview;

import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.databinding.BindingAdapter;

@RestrictTo(RestrictTo.Scope.LIBRARY)
@SuppressWarnings({"WeakerAccess", "unused"})
public class ImageViewExtensionsBindingAdapter {
  @BindingAdapter("srcCompat")
  public static void setImageResource(@NonNull AppCompatImageView view, @DrawableRes int resId) {
    view.setImageResource(resId);
  }

  @BindingAdapter("assetName")
  public static void setImageAssetName(@NonNull WiderImageView view, @NonNull String assetName) {
    view.setImageAssetName(assetName);
  }
}
